/*命名规则：字段名加List*/

// 属性类型(1、枚举 | 2、数值 | 3、小数 | 4、日期 | 5、文本)

export const queryList = [
  { value: 1, label: '车牌号码' },
  { value: 4, label: '预约单号' },
  { value: 2, label: '客户姓名' },
  { value: 3, label: '手机号码' },
];

export const queryUserList = [
  { value: 1, label: '车牌号' },
  { value: 2, label: '客户姓名' },
  { value: 3, label: '手机号码' },
];


export const sexList = [
  { value: 0, label: '女' },
  { value: 1, label: '男' },
  { value: 2, label: '--' },

];

//维修类型
export const maintainTypeList = [
  { value: 1, label: '维修' },
  { value: 2, label: '保养' },
  { value: 3, label: '检测' },
  { value: 4, label: '洗车' },
];

// 预约来源
export const appointSourceList = [
  { value: '00330001', label: '前台' },
  { value: '00330003', label: '客服' },
  { value: '00330004', label: '电销' },
  { value: '00330005', label: '微信' }
];

//接单类型
export const orderStatusList = [
  { value: 'CONFIRMED', label: '已确认' },
  { value: 'NOTCONFIRMED', label: '待确认' },

]


//预约状态 (RESERVED已预约、NOTCONFIRMED 待确认、CONFIRMED已确认、COMPLETED已接车、EXPIRED已过期、CANCELED已取消)
export const oppoiStatusList = [
  // { value: 'RESERVED', label: '已预约' },
  { value: 'EXPIRED', label: '已过期' },
  { value: 'CANCELED', label: '已取消' },
  { value: 'COMPLETED', label: '已接车' },
  { value: 'NOTCONFIRMED', label: '待确认' },
  { value: 'CONFIRMED', label: '已确认' },

]


//预约类型
export const appointmentTypeList = [
  { value: '00520001', label: '新客户预约' },
  { value: '00520002', label: '活动邀约' },
  { value: '00520003', label: '保养到期预约' },
  { value: '00520004', label: '维修到期' },
  { value: '00520005', label: '订货到件' },
  { value: '00520006', label: '报价未修跟进' },
  { value: '00520007', label: '流失回厂预约' },
  { value: '00520008', label: '潜客预约' },
  { value: '00520009', label: '修后回访预约' },
  { value: '00520010', label: '报价未修预约' },
  { value: '00520011', label: '活动招揽预约' },
  { value: '00520012', label: '电商预约' },
  { value: '00520013', label: '其他预约' },

]


//跟踪方式 跟进类型(PHONE:电话,NOTE:短信,PHONE_NOTE:电话+短信,OTHER:其他)
export const flollowTypeList = [
  { value: 'PHONE', label: '电话' },
  { value: 'NOTE', label: '短信' },
  { value: 'PHONE_NOTE', label: '电话+短信' },
  // { value: '邮件', label: '邮件' },
  // { value: '派卡', label: '派卡' },
  { value: 'OTHER', label: '其他' },
]



//渠道
export const channelList = [
  { value: '3d0be93a-0aba-419a-b262-1f58a2c3155d', label: 'ERP' },
  { value: '54d507ab-70f7-496d-9ff4-71997588b223', label: '晓鸟' },
  { value: '6da855d8-557b-4bde-a24c-6a39a4acfda2', label: '门店运营系统' },
  { value: '0a0bd2be-3dea-48c5-b4e2-a68a8e5cd512', label: '云客服' },
  { value: '18c4e07d-7f76-47ba-8747-a6f4674cfe27', label: '车管家' },

]
export const feedbackTypeList = [
  { value: 1, label: '按期来店' },
  { value: 2, label: '改期来店' },
  { value: 3, label: '取消来店' },
]

//取消原因
export const cancelReasonList = [
  { code: '1', name: '已在别处维修' },
  { code: '2', name: '时间冲突' },
  { code: '3', name: '价格' },
  { code: '4', name: '品质' },
  { code: '5', name: '其他' },
]
//确认方式
export const confirmWayList = [
  { value: 'phone', label: '电话' },
  { value: 'note', label: '短信' },
  { value: 'wechat', label: '微信' },
  { value: 'other', label: '其他' },
]


//消息类型
export const msgTypeList = [
  { value: 1, label: '微信公众号' },
  { value: 2, label: '微信小程序' },
  { value: 3, label: '短信' },
  { value: 4, label: '晓鸟' },
]


//发送状态
export const sendTypeList = [
  { value: 'pengding', label: '待发送' },
  { value: 'success', label: '发送成功' },
  { value: 'failed', label: '发送失败' },
]

//优惠券类型
export const couponTypeList = [
  { value: 'MJ', label: '抵扣券' },
  { value: 'ZK', label: '折扣券' },
  { value: 'DH', label: '兑换券' },
  { value: 'CK', label: '次卡' },
  { value: 'CZ', label: '储值卡' },
]


//使用场景
export const useSceneTypeList = [
  { value: 'online_mall', label: '线上商城' },
  { value: 'smart_store', label: '线下门店' },

]


//状态
export const batchStatusList = [
  { value: 1, label: '下架' },
  { value: 2, label: '上架' },
  { value: 3, label: '已失效' }

]


//场景
export const sceneTypeList = [
  { value: 'appointment', label: '预约' },
  { value: 'appoint', label: '预约' },

]


//发送方式
export const sendMetheodList = [
  { value: 3, label: '短信通知' },
  { value: 2, label: '小程序通知' },
  { value: 1, label: '公众号通知' },
  { value: 4, label: '晓鸟通知' },

]


export const dispSearchList = [
  { value: 1, label: '车牌号' },
  { value: 2, label: 'VIN码' },
  { value: 3, label: '工单单号' },
];


//领料状态
export const pickStatusList = [
  { value: 402, label: '待开工' },
  { value: 512, label: '部分领料' },
  { value: 511, label: '未领料' },
  { value: 513, label: '已领完' },
  { value: 510, label: '无配料' },
]

//领料状态
export const reworkEnableList = [
  { value: 0, label: '否' },
  { value: 1, label: '是' },
]
//工单状态
export const workStatusList = [
  { value: 402, label: '待开工' },
  { value: 501, label: '施工中' },
  { value: 502, label: '完工总检' },
  { value: 401, label: '待派工' },
  { value: 800, label: '验车完成' },
]
//终审状态
export const judgStatusList = [
  { value: 0, label: '未终审' },
  { value: 1, label: '已终审' },
]
//工单类型
export const orderTypeList = [
  { value: 'PX', label: '普修' },
  { value: 'BP', label: '钣喷' },
  { value: 'MR', label: '洗美' },
]

//配件查询
export const partTypeList = [
  { value: 1, label: '配件编码' },
  { value: 2, label: '内码' },
  { value: 3, label: 'OE码' },
  { value: 4, label: '配件全称' },
];

//工种
export const itemKindList = [
  { value: 'PQ', label: '喷漆' },
  { value: 'JD', label: '机电' },
  { value: 'MR', label: '洗美' },
  { value: 'BJ', label: '钣金' },
]
export const contactTypeList = [
  { value: 'PHONE', label: '电话' },
  { value: 'NOTE', label: '短信' },
  { value: 'WECHAT', label: '微信' },
  { value: 'OTHER', label: '其他' },
];
//门店管理类型
export const shopMangerList = [
  { value: 1, label: '直营' },
  { value: 2, label: '联营' },
  { value: 3, label: '加盟' },

]

//门店类型
export const shopTypeList = [
  { value: '01070103', label: '标准' },
  { value: '01070102', label: '旗舰' },
  { value: '01070105', label: '社区店' },
  { value: '01070104', label: '小型店' },
  // { value: '01070101', label: '超级店' },


]
//发票
export const invoiceTypeList= [
  { value: 'P001' ,label: '不需要' },
  {  value: 'P002' ,label: '普通发票'},
  {  value: 'P003',label: '增值税专用发票' },
]

// 接车单状态--新版
export const pickCarsStatusList = [
  {label: '草稿', value: 0},
  {label: '在报价', value: 100},
  {label: '准备维修', value: 200},
  {label: '在维修', value: 201},
  {label: '已完工', value: 600},
  {label: '已总检', value: 700},
  {label: '已验车', value: 800},
  {label: '结算中', value: 1000},
  {label: '已结算', value: 1100},
  {label: '未修离场', value: 1300} 
]
const allEnumList: any = {
  queryList,
  sexList, // 性别数据字典
  maintainTypeList,
  appointSourceList,
  orderStatusList,
  oppoiStatusList,
  appointmentTypeList,
  channelList,
  cancelReasonList,
  flollowTypeList,
  msgTypeList,
  sendTypeList,
  couponTypeList,
  useSceneTypeList,
  batchStatusList,
  sceneTypeList,
  sendMetheodList,
  pickStatusList,
  workStatusList,
  judgStatusList,
  orderTypeList,
  partTypeList,
  itemKindList,
  contactTypeList,
  feedbackTypeList,
  confirmWayList,
  shopTypeList,
  shopMangerList,
  invoiceTypeList,
  pickCarsStatusList
}

export const dictShow = (column: any, cellValue: any) => {
  let showText = cellValue;
  let arrList: any = allEnumList[column + "List"] || []
  arrList.forEach((item: any) => {
      if (item.value == cellValue) {
          showText = item.label
      }
  })
  return showText;
}

export default {
  ...allEnumList,
  dictShow,
};
